package lesson3.pages.locators;

import java.util.HashMap;
import java.util.Map;

import lesson3.api.ApplicationManager;
import lesson3.api.models.LocatorModel;

import org.openqa.selenium.By;

public class LocatorBase
{
	// Application manager instance
	protected final ApplicationManager app;
	// Locator array
	protected Map<String, LocatorModel> locators = new HashMap<String, LocatorModel>();

	public LocatorBase(ApplicationManager p_app)
	{
		app = p_app;
	}

	public void setLocator(String p_name, String p_type, String p_value)
	{
		locators.put(p_name, new LocatorModel(p_type, p_value));
	}

	public By getLocator(String p_name)
	{
		return app.locator().getLocator(p_name);
	}

}
